<template>
    <div></div>
</template>

<script>
export default {
    name: 'Test',
    mounted() {
        let postData = this.qs.stringify({
            id: 777
        })
        this.axios.post('/api/test/set.json', postData).then(res => {
            const data = res.data
            if (data.status == 1) {
                this.axios.post('/api/user/my_info.json').then(res => {
                    const data = res.data
                    if (data.status == 1) {
                        sessionStorage.setItem(
                            'userInfo',
                            JSON.stringify(data.data)
                        )
                    } else {
                        this.commonDialog.alert('提示', data.msg)
                    }
                })
            } else {
                this.commonDialog.alert('提示', data.msg)
            }
        })
    }
}
</script>

<style lang="stylus" scoped></style>
